package com.sunshine.asm.oneday;

import org.objectweb.asm.ClassAdapter;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

public class MyClassAdapter extends ClassAdapter {

	public MyClassAdapter(ClassVisitor cv, String mName, String mDesc) {
		super(cv);

	}

	@Override
	public FieldVisitor visitField(int access, String name, String desc,
			String signature, Object value) {
		
		return cv.visitField(access, name, desc, signature, value);
	}

	@Override
	public MethodVisitor visitMethod(int access, String name, String desc,
			String signature, String[] exceptions) {
		
		MethodVisitor mv =  cv.visitMethod(access, name, desc, signature, exceptions);
		return mv;
	}

	@Override
	public void visitEnd() {
		
		FieldVisitor fv = cv.visitField(Opcodes.ACC_PUBLIC, null, null, null, null);
		fv.visitEnd();
		
		cv.visitEnd();
	}

}
